import java.util.*;
/**
 * A token for holding a comment that has been translated
 * into LaTeX.
 * 
 * @author James Stanier
 */
public class LaTeXCommentToken {
	private ArrayList<KeywordToken> keywords;
	private String translatedCode;
	private boolean open;
	private Node parent;
	private int lineNumber;
	private int sectionNumber;
	
	/**
	 * Constructor.
	 * @param c Translated comment in LaTeX.
	 * @param o Whether it is an !open comment.
	 * @param p The node in the tree representing the comment.
	 * @param l Line number that the comment starts on.
	 * @param s Section number of the comment.
	 * @param k List of keywords contained in the comment.
	 */
	public LaTeXCommentToken(String c, boolean o, Node p, int l, int s, ArrayList<KeywordToken> k) {
		translatedCode = c;
		open = o;
		parent = p;
		lineNumber = l;
		sectionNumber = s;
		keywords = k;
	}
	
	/**
	 * Get the comment in LaTeX.
	 * @return the comment in LaTeX.
	 */
	public String getCode() {
		return translatedCode;
	}
	
	/**
	 * Get whether the comment is !open.
	 * @return
	 */
	public boolean isOpen() {
		return open;
	}
	
	/**
	 * Get the parent node of the comment.
	 * @return Comment's parent node.
	 */
	public Node getParent() {
		return parent;
	}
	
	/**
	 * Get the line number that the comment begins on.
	 * @return The comment's beginning line number.
	 */
	public int getLineNumber() {
		return lineNumber;
	}
	
	/**
	 * Get the section number of the comment.
	 * @return The comment's section number.
	 */
	public int getSectionNumber() {
		return sectionNumber;
	}
	
	/**
	 * Get the array of keywords that have been declared inside 
	 * the comment.
	 * @return Array of declared keywords.
	 */
	public ArrayList<KeywordToken> getKeywords() {
		return keywords;
	}
}
